<?php

class Core_Action_Admin_System_Appearance_Theme_Index extends Action_Admin
{
	public function execute($request, $initial = false, $script = null)
	{
		if ($initial)
		{
			Agilet::setVar('breadcrum', array(
				array(
					'url' => 'admin/system/appearance',
					'label' => 'Appearance'
				),
				array(
					'url' => 'admin/system/appearance/theme',
					'label' => 'Theme'
				),
			));
		}

		$table = Model::getTable('core/appearance/theme');

		$items = $table -> fetchAll();

		$request -> response = View::render($script = 'core/html/admin/system/appearance/theme/index', $data = array('items' => $items));
	}

}
